package exception;

/**
 * throws的演示
 */
public class ThrowsDemo {
    public static void main(String[] args) {
        Student s = new Student();

        try {
            s.setAge(101);
        } catch (IllegalAgeException e) {
            e.printStackTrace();
        }
        System.out.println(s.getAge());
    }
}
